/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package model.creature.plant.plugin;

import java.awt.Image;
import model.creature.plant.MultiHarvestPlant;
import model.game.GameInterface;
import model.map.cell.PlantableCell;
import model.utility.ImageUtility;

/**
 * Cannot be harvested but acts as a tough wall.
 */
public class Stone extends MultiHarvestPlant {

  public Stone(GameInterface game, PlantableCell cell) {
    super(game, cell);
  }
  
  @Override
  public boolean isSteppable() {
    return false;
  }

  @Override
  protected String getFruitName() {
    assert false;
    return "";
  }

  @Override
  protected int timeToMature() {
    return 1000000000;
  }

  @Override
  protected int timeToDie() {
    return 1000000000;
  }

  @Override
  protected int timeToHarvest(int harvest_count) {
    return 1000000000;
  }

  @Override
  protected int getHPAtCurrentLevel() {
    return 100 + getLevel() * getLevel() * 30;
  }

  @Override
  public boolean canUpgrade() {
    if (getLevel() < 5) {
      return true;
    }
    return false;
  }

  @Override
  public int getUpgradeCost() {
    switch (getLevel()) {
      case 0:
        return 100;
      case 1:
        return 200;
      case 2:
        return 400;
      case 3:
        return 800;
      case 4:
        return 1500;
    }
    assert false;
    return 0;
  }

  @Override
  public Image getImage() {
    return ImageUtility.loadImage("resources/pictures/plants/stone/stone.png");
  }

  @Override
  public String getName() {
    return "Stone";
  }

  @Override
  public String getSeason() {
    // all seasons
    return game_.getGameTime().getCurrentSeason().getName();
  }

  @Override
  public String getDescription() {
    return "Blocks the path of enemies. Lasts until hp <= 0.";
  }

}
